package numberSort;

import java.util.Random;

import javax.swing.JOptionPane;

import junit.framework.Assert;
import junit.framework.TestCase;

public class SortTest /*extends TestCase*/ {

	public void GenerateNumbers() {
		
		String input = JOptionPane.showInputDialog
				("How many random numbers to order?");
		int target = Integer.parseInt(input);
				
		long[] numberHold = new long[target];
		
		System.out.print("The original numbers are: ");
		
		for (int i = 0; i < numberHold.length; i++) {
			
			int randomNumber = randomNumber(100);
			numberHold[i] = randomNumber;
			System.out.print(numberHold[i] + " ");
			
		}
		
		System.out.println();		
		MainSort run = new MainSort();
		run.BubbleSort(numberHold);
		
	}
	
	private static int randomNumber(int ran) {
		
		Random randomGenerator = new Random();
		int randomInt = randomGenerator.nextInt(ran);
		
		return randomInt;
		
	}

}
